﻿using CID.Domain.Infrastructure;

namespace CID.Web.Models.Infrastructure
{
    public class PackageTypeViewModel : BaseDescribedViewModel<IPackageType>
    {
        public bool Enabled { get; set; }

        public PackageTypeViewModel() : base() { }

        public PackageTypeViewModel(IPackageType packageType) : base(packageType)
        {
            Enabled = packageType.Enabled;
        }

        public override void UpdateModel(IPackageType model)
        {
            base.UpdateModel(model);
            model.Enabled = Enabled;
        }
    }
}